﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessLibrary.DAL;

namespace BusinessLibrary.BLL
{
   public class Emplois_matiere
    {
         #region var
        public int  Id { get; set; }
        public int Nbr_heure { get; set; }        
        public Niveau niveau { get; set; }
        public Specialite  specialite { get; set; }
        public Matiere matiere { get; set; }

     

        #endregion
        #region methodes
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Emplois_matiere GetEmplois_matiereById(int id)
        {
            return SqlEmplois_matiere.GetEmplois_matiereById(id);  
        }


        public static int deleteEmplois_matiere(int id)
        {
            return SqlEmplois_matiere.deleteEmplois_matiere(id  );
        }

        
        public static int SaveEmplois_matiere(Emplois_matiere EM)
        {
            int nbRow;
            if ((nbRow = SqlEmplois_matiere.updateEmplois_matiere(EM)) > 0)
                return nbRow;
            else
                return SqlEmplois_matiere.insertEmplois_matiere(EM);
        }
    }
        #endregion
}

    

